package tools;

import java.util.ArrayList;

import javax.swing.ImageIcon;

public class Test {

	private static Test singleton;

	public LocalUserIHMTest localUser;
	public ImageIcon imageIcon;
	public ArrayList<String> connectedFriends;
	public ArrayList<String> connectedUsers;
	private String login;
	private String password;
	public AlbumIHMTest album1;
	public AlbumIHMTest album2;

	public Test()
	{
		login = new String( "admin" );
		password = new String( "admin" );
		localUser = new LocalUserIHMTest();
		localUser.address = "UTC";
		localUser.birthDate = "24/11/2010";
		localUser.email = "toto@utc.fr";
		localUser.firstName = "Toto";
		localUser.hobbies = "informatique, cinema";
		localUser.lastName = "Dupond";
		localUser.password = "azerty123456";
		localUser.port = "22";
		localUser.telNumber = "01.23.45.67.89";
		imageIcon = new ImageIcon( "C:/Users/Clem/Documents/UTC/LO23/unicorn.jpg" );
		// imageIcon = new ImageIcon( "C:/Users/Clem/Documents/UTC/LO23/tux-gendarme-mobile.png" );
		connectedFriends = new ArrayList<String>();
		connectedFriends.add( "Jean Dupont" );
		connectedFriends.add( "Franck Martin" );
		connectedFriends.add( "Sup Erman" );
		connectedFriends.add( "Jean Nuit" );
		connectedUsers = new ArrayList<String>();
		connectedUsers.add( "Jean Dupont" );
		connectedUsers.add( "Franck Martin" );
		connectedUsers.add( "Sup Erman" );
		connectedUsers.add( "Jean Nuit" );
		connectedUsers.add( "Alfred Bidule" );
	}

	public boolean checkPassword( String login, String password )
	{
		boolean result = false;
		if(	this.login.compareTo( login ) == 0 &&
				this.password.compareTo( password ) == 0 )
		{
			result = true;
		}
		return result;
	}

	public static Test getInstance() {
		if( singleton == null )
		{
			singleton = new Test();
		}
		return singleton;
	}

}
